package com.fpt.group3.service;

import java.util.List;

import com.fpt.group3.dao.CountryDAOImpl;
import com.fpt.group3.form.Country;
import com.fpt.group3.service.exception.SystemException;

/**
 * CountryServiceImpl.
 * @author John Tran
 */
public class CountryServiceImpl implements CountryService {

    /**
     * countryDAOImpl.
     */
    private CountryDAOImpl countryDAOImpl;

    /**
     * setCountryDAOImpl.
     * @param countryDAOImplIn countryDAOImpl
     */
    public final void setCountryDAOImpl(final CountryDAOImpl countryDAOImplIn) {
        this.countryDAOImpl = countryDAOImplIn;
    }

    /**
     * listCountry.
     * @exception SystemException SystemException
     * @return listCountry
     */
    @Override
    public final List<Country> listCountry() throws SystemException {
        return countryDAOImpl.listCountry();
    }

    /**
     * getCountryIdByName.
     * @param reName reName
     * @return countryID
     * @exception SystemException SystemException
     */
    @Override
    public final int getCountryIdByName(final String reName)
            throws SystemException {
        return countryDAOImpl.getCountryIdByName(reName);
    }
}
